<template>
    <footer class="footer-nav">
        <div class="footer-container">
            <div class="footer-logo">
                <h2>{{ websiteConfig.logo.name }}</h2>
                <div class="contact-info">
                    <div class="info-item">
                        <el-icon><User /></el-icon>
                        <span>{{ websiteConfig.contactInfo.service }}</span>
                    </div>
                    <div class="info-item">
                        <el-icon><Phone /></el-icon>
                        <span>{{ websiteConfig.contactInfo.phone }}</span>
                    </div>
                    <div class="info-item">
                        <el-icon><Message /></el-icon>
                        <span>{{ websiteConfig.contactInfo.email }}</span>
                    </div>
                    <div class="info-item">
                        <el-icon><Location /></el-icon>
                        <span>{{ websiteConfig.contactInfo.address }}</span>
                    </div>
                </div>
            </div>
            <div class="footer-nav-links">
                <a v-for="(link, index) in websiteConfig.footerLinks" 
                   :key="index" 
                   :href="link.link">{{ link.title }}</a>
            </div>
            <div class="footer-qrcode">
                <img :src="websiteConfig.qrcode" alt="二维码" />
                <span>二维码</span>
            </div>
        </div>
    </footer>
</template>

<script setup lang="ts">
import { User, Phone, Message, Location } from '@element-plus/icons-vue';
import { websiteConfig } from '../config';
</script>

<style scoped>
.footer-nav {
    background-color: #2c2c2c;
    padding: 40px 0;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0 20px;
}

.footer-logo h2 {
    color: #fff;
    font-size: 24px;
    margin-bottom: 20px;
}

.contact-info {
    color: #999;
}

.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.info-item i {
    margin-right: 10px;
    width: 16px;
    height: 16px;
    /* 这里需要添加对应的图标样式 */
}

.footer-nav-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
}

.footer-nav-links a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
}

.footer-nav-links a:hover {
    color: #1890ff;
}

.footer-qrcode {
    text-align: center;
}

.footer-qrcode img {
    width: 120px;
    height: 120px;
    margin-bottom: 10px;
}

.footer-qrcode span {
    color: #999;
    font-size: 14px;
}
</style>